package com.jsh.erp.datasource.mappers;

import com.jsh.erp.datasource.entities.PlatformConfig;
import com.jsh.erp.datasource.entities.Rebate;
import com.jsh.erp.datasource.entities.RebateVo;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

public interface RebateMapperEx {


    List<Rebate> selectByConditionRebate(@Param("rebateCode") String rebateCode,
                                         @Param("offset") Integer offset,
                                         @Param("rows") Integer rows);

    Long countRebate(@Param("rebateCode")String rebateCode);

    String selSupplierMaterial(@Param("supplierId") String supplierId,@Param("materialId") String materialId ,@Param("rebateId")String rebateId);

    List<RebateVo> rebateDetails(@Param("supplierId") String supplierId,@Param("pageNum") Integer pageNum,@Param("pageSize") Integer pageSize);

    Long rebateDetailsCount(@Param("supplierId") String supplierId);

    BigDecimal getRebateAmount(@Param("supplierId") String supplierId,
                               @Param("materialId") String materialId,
                               @Param("operNumber") BigDecimal operNumber,
                               @Param("createTime") Date createTime);
}
